package com.tiantian.quanminxiu.api;

import okhttp3.ResponseBody;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

//汇付宝服务器
public interface QQService {

    class Factory {
        public static QQService create() {
            Retrofit retrofit = new Retrofit.Builder()
                    .baseUrl("https://graph.qq.com/")
                    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                    .build();
            return retrofit.create(QQService.class);
        }
    }

    //endregion
    //region qq获取用户信息 response
    @FormUrlEncoded
    @POST("user/get_simple_userinfo")
    Observable<ResponseBody> get_simple_userinfo(@Field("openid") String openid, @Field("access_token") String access_token,
                                                 @Field("oauth_consumer_key")String oauth_consumer_key,@Field("format")String format);
    //endregion
}
